-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Slider): export function for preparing initial value #1637
Conversation
@@ -88,7 +88,7 @@ function createMarks(points: number[]): RcSliderProps['marks'] { | |||
return marks; | |||
} | |||
|
|||
export function getInnerState({ | |||
export function prepareSliderInnerState({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide some jsdoc here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, forgot to do it, thanks
143584f
Preview is ready. |
Visual Tests Report is ready. |
@@ -88,7 +88,7 @@ function createMarks(points: number[]): RcSliderProps['marks'] { | |||
return marks; | |||
} | |||
|
|||
export function getInnerState({ | |||
export function prepareSliderInnerState({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why user might needed this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why user might needed this function?
I need it to use in RangeSliderPicker component to get inner state. And I don't want to duplicate the code.
Also it could be helpful for other users in the development of components based on the slider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amje, I don't know is it really "fix" but not "chore"?
Is it important enough to get into the changelog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's important to note this change in the changelog because you have changed the implementation
-small refactor of initial value function
-add prepareSliderInnerState function to export